<?php

declare(strict_types=1);

namespace Modules\Production\Models;

use Catch\Base\CatchModel as Model;

/**
 * @property $id
 * @property $docno
 * @property $production_no
 * @property $producton_id
 * @property $kingdee_status
 * @property $creator_id
 * @property $created_at
 * @property $updated_at
 * @property $deleted_at
*/
class PickOrder extends Model
{


    protected $table = 'pick_order';

    protected $fillable = [ 'id', 'docno','org_code','cargo_type','cargo_code', 'production_no', 'producton_id', 'kingdee_status', 'creator_id', 'created_at', 'updated_at', 'deleted_at' ];

    /**
     * @var array
     */
    protected array $fields = ['id','docno','org_code','cargo_type','cargo_code','production_no','kingdee_status','created_at'];

    /**
     * @var array
     */
    protected array $form = ['id','docno','org_code','cargo_type','cargo_code','production_no','producton_id','kingdee_status','created_at','updated_at'];

    /**
     * @var array
     */
    public array $searchable = [
        'docno'         => '=',
        'production_no' => '=',
    ];

    /**
     * 时间格式化
     * @param $date
     * @return mixed
     */
    protected function serializeDate($date)
    {
        return $date->format('Y-m-d H:i');
    }

}
